<?php

use think\migration\Seeder;

class CreateDeliveryRuleSeeder extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
//        $data = array (
//            'weight_rule' =>
//                json_encode(array (
//                    'weight_start_fee' => 10,
//                    'weight_for_free' => 1,
//                    'weight_over_start_range' => 10,
//                    'weight_over_start_perfee' => 2,
//                    'weight_over_second' => 10,
//                    'weight_max_limit' => 25,
//                    'weight_fixed_fee' => 40,
//                )),
//            'distance_rule' =>
//                json_encode(array (
//                    'distance_start_fee' => 10,
//                    'distance_for_free' => 1,
//                    'distance_over_start_range' => 10,
//                    'distance_over_start_perfee' => 2.5,
//                    'distance_over_second' => 10,
//                    'distance_fixed_fee' => 50,
//                )),
//            'special_time_rule' =>
//                json_encode(array (
//                    'start_time_one' => '0:00',
//                    'end_time_one' => '7:00',
//                    'add_fee_one' => 10,
//                    'start_time_two' => '20:00',
//                    'end_time_two' => '0:00',
//                    'add_fee_two' => 8,
//                )),
//            'max_fee' => 100,
//        );
//        $table = $this->table('delivery_rule');
//        $table->insert($data)->save();
    }
}